From 9236cd8034c6d38be03782d39a71e182eebc7c34 Mon Sep 17 00:00:00 2001 From: Markus Vieth Date: Thu, 22 Aug 2024 20:48:19 +0200 Subject: [PATCH] Compatibility with clang-19 Gbp-Pq: Name 0005-Compatibility-with-clang-19.patch --- .../registration/correspondence_rejection_features.h | 6 +++--- .../pcl/surface/3rdparty/poisson4/octree_poisson.hpp | 11 +++++++---- .../pcl/surface/3rdparty/poisson4/sparse_matrix.hpp | 10 +++++++--- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/registration/include/pcl/registration/correspondence_rejection_features.h b/registration/include/pcl/registration/correspondence_rejection_features.h index 44835c37..f3bab8fe 100644 --- a/registration/include/pcl/registration/correspondence_rejection_features.h +++ b/registration/include/pcl/registration/correspondence_rejection_features.h @@ -269,9 +269,9 @@ protected: // Check if the representations are valid if (!feature_representation_->isValid(feat_src) || !feature_representation_->isValid(feat_tgt)) { - PCL_ERROR("[pcl::registration::%s::getCorrespondenceScore] Invalid feature " - "representation given!\n", - this->getClassName().c_str()); + PCL_ERROR( + "[pcl::registration::CorrespondenceRejectorFeatures::FeatureContainer::" + "getCorrespondenceScore] Invalid feature representation given!\n"); return (std::numeric_limits::max()); } diff --git a/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp b/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp index 7ed8aaf9..e7f45b65 100644 --- a/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp +++ b/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp @@ -746,7 +746,10 @@ namespace pcl Real temp,dist2; if(!children){return this;} for(int i=0;i child_center; + Real child_width; + children[i].centerAndWidth(child_center, child_width); + temp=SquareDistance(child_center,p); if(!i || tempoffset[i] = node.offset[i];} + for(i=0;ioff[i] = node.off[i];} if(node.children){ initChildren(); for(i=0;i int OctNode::CompareForwardDepths(const void* v1,const void* v2){ - return ((const OctNode*)v1)->depth-((const OctNode*)v2)->depth; + return ((const OctNode*)v1)->depth()-((const OctNode*)v2)->depth(); } template< class NodeData , class Real > @@ -874,7 +877,7 @@ namespace pcl template int OctNode::CompareBackwardDepths(const void* v1,const void* v2){ - return ((const OctNode*)v2)->depth-((const OctNode*)v1)->depth; + return ((const OctNode*)v2)->depth()-((const OctNode*)v1)->depth(); } template diff --git a/surface/include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp b/surface/include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp index 24f0a540..5e54ac78 100644 --- a/surface/include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp +++ b/surface/include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp @@ -228,14 +228,18 @@ namespace pcl template void SparseMatrix::SetZero() { - Resize(this->m_N, this->m_M); + // copied from operator *= + for (int i=0; i void SparseMatrix::SetIdentity() { SetZero(); - for(int ij=0; ij < Min( this->Rows(), this->Columns() ); ij++) + for(int ij=0; ij < std::min( rows, _maxEntriesPerRow ); ij++) (*this)(ij,ij) = T(1); } @@ -388,7 +392,7 @@ namespace pcl T alpha,beta,rDotR; int i; - solution.Resize(M.Columns()); + solution.Resize(bb.Dimensions()); solution.SetZero(); d=r=bb; -- 2.30.2